<?php
namespace App\Services\Finance;

use App\Services\ProjectValidate;

class ValidateNoticeAndPay extends ProjectValidate
{
    /**
     * 自定义子类初始化
     * @param array $initData
     * @return mixed
     */
    public function initValidate($initData = [])
    {
        
        if (!empty($initData['id'])) {
            $this->rules['id']  = 'numeric|min:0';
        }

    }
    
    public $rules = [
        'id'            => 'int|min:1',
        'name'          => 'required',
        'money'         => 'required',
        'create_at'     => 'required',
        'time'          => 'required',
        'remark'        => 'required',
        'status'        => 'in:0,1',
        'page'          => 'int|min:1',
        'listRows'      => 'integer|min:1|max:100'
    ];


    public $messages = [
       
    ];

    /**
     * @var array 上面规则中定义的 key 的名字
     */
    public $attributes = [
      
    ];
}